const clientFacade = require('../../app/facade/clients.facade.js'); 
const _  =  require('lodash');

module.exports = {
    clientRegister : clientRegister,
    getClientByLogin : getClientByLogin,
}

function clientRegister(req, res, next){
    let client=req.body;
    clientFacade.clientRegister(client,(error,result)=>{
        if (error) {
            return next(new Error(error));
        } else {
            return res.json(result);
        }        
    })
}

function getClientByLogin(req, res, next){
    let client = req.body;
    clientFacade.getClientByLogin(client,(error,result)=>{
        if (error) {
            return next(new Error(error));
        } else {
            return res.json(result);
        }        
    })

}